package com.yt.system.service.impl;

import com.yt.system.dao.ObjectiveMapper;
import com.yt.system.domain.Objective;
import com.yt.system.domain.ObjectiveKeyresults;
import com.yt.system.service.ObjectiveService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;


@Service
public class ObjectiveServiceImpl implements ObjectiveService {

    @Autowired
    ObjectiveMapper objectiveMapper;

    //    根据uid查询个人okr
    @Override
    public List<ObjectiveKeyresults> selectOkr(int uid){
        return objectiveMapper.selectOkr(uid);
    }

    //更新
    @Override
    public int UpdO(Objective user) {return objectiveMapper.UpdO(user);}
    //插入
    @Override
    public int InsO(Objective user) {return objectiveMapper.InsO(user);}
    //删除
    @Override
    public int DelO(int id) {return objectiveMapper.DelO(id);}

    @Override
    public int UpdExcellentOkr(Objective obj) {
        return objectiveMapper.UpdateExcellentOkr(obj);
    }

    @Override
    public int UpdComment(Objective obj) {
        return objectiveMapper.UpdateComment(obj);
    }
}
